package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment("店铺表")
public class Shop extends AutoIdBase {
    @Comment("商铺名称")
    private String name;

    @Comment("商铺类型：1.直营 2加盟")
    private Integer type;

    @Comment("地区")
    @ManyToOne
    private Region region;

    @Comment("联系电话")
    private String phoneNumber;

    public Shop(LocalDateTime createTime, String name, Integer type, Region region, String phoneNumber) {
        super(createTime);
        this.name = name;
        this.type = type;
        this.region = region;
        this.phoneNumber = phoneNumber;
    }
}
